﻿using System.Data;
using LibDataLayer;

namespace LibBusinessLayer
{
    public class BllPosts
    {
        #region[Get-Data]
        public DataTable GetPosts(string keywords)
        {
            return DalPosts.GetPosts(keywords);
        }
        public DataTable GetPostsEdit(int id)
        {
            return DalPosts.GetPostsEdit(id);
        }
        public DataTable GetPostsFillterStatus(int IsActive)
        {
            return DalPosts.GetPostsFillterStatus(IsActive);
        }
        public DataTable GetPostsFillterCategories(int Tid)
        {
            return DalPosts.GetPostsFillterCategories(Tid);
        }
        public DataTable GetPostsFillterDate(string DateBegin, string DateEnd)
        {
            return DalPosts.GetPostsFillterDate(DateBegin, DateEnd);
        }
        #endregion

        #region[Insert-Update-Delete]
        public static bool Insert(DTOPosts obj)
        {
            return DalPosts.Insert(obj);
        }
        public static bool Update(DTOPosts obj)
        {
            return DalPosts.Update(obj);
        }
        public static bool Delete(DTOPosts obj)
        {
            return DalPosts.Delete(obj);
        }
        public static bool UpdateCheck(DTOPosts obj)
        {
            return DalPosts.UpdateCheck(obj);
        }
        #endregion

        #region[Get-Data]
        public DataTable GetPostsHomePage(string keywords, int Tid)
        {
            return DalPosts.GetPostsHomePage(keywords, Tid);
        }
        public DataTable GetPostsHomePageFid(string keywords, int Tid)
        {
            return DalPosts.GetPostsHomePageFid(keywords, Tid);
        }
        public static bool InsertHomePage(DTOTopics obj)
        {
            return DalPosts.InsertHomePage(obj);
        }
        #endregion
    }
}